package com.example.demo.service;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo.common.IdParam;
import com.example.demo.domain.entity.VojSubmissions;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.demo.domain.exam.ExamSubmitLog;
import com.example.demo.dto.*;
import com.example.demo.param.voj.SubmissionCreateParam;
import com.example.demo.param.voj.SubmissionLatestQueryParam;

import java.util.Date;
import java.util.List;

/**
* @author 00774904
* @description 针对表【voj_submissions】的数据库操作Service
* @createDate 2023-12-18 18:23:20
*/
public interface VojSubmissionsService extends IService<VojSubmissions> {

    Long createSubmission(SubmissionCreateParam param);

    SolveProblemCountReturnDto getSolveProblemCount();

    List<LatestSubmissionResultDto> getSubmissionResult(IdParam idParam);

    List<SubmissionGroupDayDto> getNumberOfSubmissionsGroupByDay(DateTime startTime, DateTime endTime, boolean isAcceptedOnly);

    List<SubmissionGroupDayLanguageDto> getNumberOfSubmissionsGroupByDayAndLanguage(DateTime previousDate, DateTime today, boolean b);

    SubmissionPeriodReturnDto getNumberOfSubmissionsGroupByMonth(Date startTime, Date endTime);

    Page<LatestSubmissionResultDto> getLatestSubmissions(SubmissionLatestQueryParam param);

    LatestSubmissionResultDto getSubmitLogBySubmissionId(Long submissionId);

    List<LatestSubmissionResultDto> getQuestionSubmitLog(Long questionID, Long examId);
}
